package com.taiji.webfluxcurd.service;

import com.taiji.webfluxcurd.domain.User;
import com.taiji.webfluxcurd.utils.PageDTO;
import org.springframework.http.codec.multipart.FilePart;
import org.springframework.http.codec.multipart.Part;
import reactor.core.publisher.Flux;
import reactor.core.publisher.Mono;

import java.io.IOException;
import java.util.List;

public interface IUserService {

    Mono<User> add(User user);

    Mono<User> update(User user);

    Mono<User> findById(String id);

    Mono<Void> delete(String id);
    Mono<List<User>> findAll();

    Mono<Void> fileUpload(Flux<Part> flux) ;

    Flux<User>   uploadImg(FilePart filePart) throws IOException;

    Mono<List<User>> testSql(User user);

    Mono<List<User>> page(PageDTO pageDTO);
}
